package com.only4play.practice.park.core.entity;

import com.only4play.codegen.processor.creator.IgnoreCreator;
import com.only4play.codegen.processor.updater.IgnoreUpdater;
import com.only4play.codegen.support.constants.ValidStatus;
import com.only4play.codegen.support.model.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author mengdy
 */

//@GenCreator(pkgName = "com.only4play.practice.ordercenter.model.creator")
//@GenUpdater(pkgName = "com.only4play.practice.ordercenter.model.updater")
//// findById方法
//@GenVo(pkgName = "com.only4play.practice.ordercenter.model.vo")
//// findByPage方法
//@GenQuery(pkgName = "com.only4play.practice.ordercenter.model.query")
//@GenCreateRequest(pkgName = "com.only4play.practice.ordercenter.model.request")
//@GenUpdateRequest(pkgName = "com.only4play.practice.ordercenter.model.request")
//@GenQueryRequest(pkgName = "com.only4play.practice.ordercenter.model.request")
//@GenResponse(pkgName = "com.only4play.practice.ordercenter.model.response")
//@GenDto(pkgName = "com.only4play.practice.ordercenter.model.dto")
//
//@GenFeign(pkgName = "com.only4play.practice.ordercenter.model.feign")
//
//// 生成serviceImpl
//@GenObjectMapper(pkgName = "com.only4play.practice.ordercenter.entitymapper")
//// 生成serviceImpl
//@GenMapper(pkgName = "com.only4play.practice.ordercenter.core.mapper")
//@GenService(pkgName = "com.only4play.practice.ordercenter.core.service")
//@GenServiceImpl(pkgName = "com.only4play.practice.ordercenter.core.service.impl")
//
//@GenController(pkgName = "com.only4play.practice.ordercenter.core.controller")
/**
 *
 * @author mengdy
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class Park extends BaseEntity {

    @ApiModelProperty(value = "停车场名称")
    private String parkName;

    @ApiModelProperty(value = "固定车位数")
    private Integer cardLot;

    @ApiModelProperty(value = "临时车位数")
    private Integer tempLot;

    @ApiModelProperty(value = "保留车位数")
    private Integer reserveLot;

    @IgnoreUpdater
    @IgnoreCreator
    private ValidStatus validStatus;

    public void init() {
        setValidStatus(ValidStatus.VALID);
    }

    public void valid(){
        setValidStatus(ValidStatus.VALID);
    }

    public void invalid(){
        setValidStatus(ValidStatus.INVALID);
    }

}
